<template>
	<view class="myselfallBox" :style="{paddingTop:`${navbarHeight}px`}">
		<myUserCardVue :userInfo='userInfoData'></myUserCardVue>
		<cardBackVue v-if="[2, 4].includes(identify)"></cardBackVue>
		<view class="Placeholder" v-else></view>
		<buttonFlexVue></buttonFlexVue>
		<selectItemListVue></selectItemListVue>
		<bottomNavBar></bottomNavBar>
	</view>
</template>

<script setup>
	import { GetUser } from '@/config/API/user';
	import selectItemListVue from './components/selectItemList.vue';
	import buttonFlexVue from './components/buttonFlex.vue';
	import cardBackVue from './components/cardBack.vue';
	import myUserCardVue from './components/myUserCard.vue';
	import bottomNavBar from '@/components/bottomNavBar.vue';
	import { ref } from 'vue';
	import {onShow,onLoad} from '@dcloudio/uni-app';
	import {navbarHeight} from '@/config/systemInfo.js'
	const userInfoData = ref()
	const identify =ref()
	onLoad(async()=>{
		identify.value = uni.getStorageSync('userInfo').identify
		const data = await GetUser()
		userInfoData.value = { ...data.data, ...uni.getStorageSync('userInfo') };
		console.log('我的信息',userInfoData.value)
	})
	onShow(()=>{
		console.log('我的信息82',identify.value)
	})
</script>

<style scoped>
.myselfallBox{
	width: 100vw;
	min-height: 100vh;
	background: linear-gradient(to top, rgb(237, 237, 240) 0%, rgb(237, 237, 240) 70%, rgb(193, 200, 215) 100%);
	padding-bottom: 150rpx;
	box-sizing: border-box;
}
.Placeholder{
	width: 100%;
	height: 40rpx;
}
</style>